#ifndef ULeafWindowH
#define ULeafWindowH
#include "stdafx.h"
#include "UDockable.h" //needed for inheritance

//Used for auto grouping windows
extern int LastWindowTypeBuildings;
extern int LastWindowTypeUnits    ;

class TLeafWindow: public TDockable
{
private:
public:

	TLeafWindow(TRectangle Rect, TCustomWindow* child, TContainerWindow* parent, TWindowThemer *wt, std::string name, int tag = WT_None);
	TCustomWindow* Child;
	int Tag;

	virtual bool Dock(TDockable* WindowToDock, int X, int Y);

	virtual void Draw( );
	virtual void KeyDown	(SDL_KeyboardEvent* Key);
	virtual void KeyUp		(SDL_KeyboardEvent* Key);
	virtual void MouseMove	(int X, int Y, int mstate);
	virtual void MouseDown	(int X, int Y, uint8 button);
	virtual void MouseUp	(int X, int Y, uint8 button);
	virtual void MouseLeave	();
	virtual void SetPos(TRectangle Rect);
	virtual TDockable* FindWindowByTag(int tag);
};
#endif
